home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / lang / Python16_Src.lha / Python16_Source / README < prev    next >
Encoding:
Text File  |  2000-09-03  |  34.0 KB  |  826 lines

  1. This is Python version 1.6
  2. ==========================
  3.  
  4. Copyright (c) 1995-2000 Corporation for National Research Initiatives.
  5. All rights reserved.
  6.  
  7. Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
  8. All rights reserved.
  9.  
  10. License information
  11. -------------------
  12.  
  13. See the file "LICENSE" for information on terms & conditions for
  14. accessing and otherwise using this software, and for a DISCLAIMER OF
  15. ALL WARRANTIES.
  16.  
  17.  
  18. What's new in this release?
  19. ---------------------------
  20.  
  21. See http://www.python.org/1.6/.
  22.  
  23.  
  24. If you don't read instructions
  25. ------------------------------
  26.  
  27. Congratulations on getting this far. :-)
  28.  
  29. To start building right away (on UNIX): type "./configure" in the
  30. current directory and when it finishes, type "make".  The section
  31. Build Instructions below is still recommended reading. :-)
  32.  
  33.  
  34. What is Python anyway?
  35. ----------------------
  36.  
  37. Python is an interpreted object-oriented programming language, and is
  38. often compared to Tcl, Perl, Java or Scheme.  To find out more, point
  39. your browser to http://www.python.org/.
  40.  
  41.  
  42. How do I learn Python?
  43. ----------------------
  44.  
  45. The official tutorial is still a good place to start; see
  46. http://www.python.org/doc/ for online and downloadable versions, as
  47. well as a list of other introductions, and reference documentation.
  48.  
  49. There's a quickly growing set of books on Python.  See
  50. http://www.python.org/psa/bookstore/ for a list.
  51.  
  52.  
  53. Build instructions
  54. ==================
  55.  
  56. Before you can build Python, you must first configure it.
  57. Fortunately, the configuration and build process has been streamlined
  58. for most Unix installations, so all you have to do is type a few
  59. commands, optionally edit one file, and sit back.  There are some
  60. platforms where things are not quite as smooth; see the platform
  61. specific notes below.  If you want to build for multiple platforms
  62. sharing the same source tree, see the section on VPATH below.
  63.  
  64. You start by running the script "./configure", which figures out your
  65. system configuration and creates several Makefiles.  (It takes a
  66. minute or two -- please be patient!)  When it's done, you are ready to
  67. run make.  You may want to pass options to the configure script -- see
  68. the section below on configuration options and variables.
  69.  
  70. To build Python, you normally type "make" in the toplevel directory.
  71. This will recursively run make in each of the subdirectories Parser,
  72. Objects, Python and Modules, creating a library file in each one.  The
  73. executable of the interpreter is built in the Modules subdirectory and
  74. moved up here when it is built.  If you want or need to, you can also
  75. chdir into each subdirectory in turn and run make there manually (do
  76. the Modules subdirectory last!).
  77.  
  78. Once you have built an interpreter, see the subsections below on
  79. testing, configuring additional modules, and installation.  If you run
  80. in trouble, see the next section.
  81.  
  82.  
  83. Troubleshooting
  84. ---------------
  85.  
  86. See also the platform specific notes in the next section.
  87.  
  88. If recursive makes fail, try invoking make as "make MAKE=make".
  89.  
  90. If you run into other trouble, see section 3 of the FAQ
  91. (http://grail.cnri.reston.va.us/cgi-bin/faqw.py or
  92. http://www.python.org/doc/FAQ.html) for hints on what can go wrong,
  93. and how to fix it.
  94.  
  95. If you rerun the configure script with different options, remove all
  96. object files by running "make clean" before rebuilding.  Believe it or
  97. not, "make clean" sometimes helps to clean up other inexplicable
  98. problems as well.  Try it before sending in a bug report!
  99.  
  100. If the configure script fails or doesn't seem to find things that
  101. should be there, inspect the config.log file.  When you fix a
  102. configure problem, be sure to remove config.cache!
  103.  
  104. If you get a warning for every file about the -Olimit option being no
  105. longer supported, you can ignore it.  There's no foolproof way to know
  106. whether this option is needed; all I can do is test whether it is
  107. accepted without error.  On some systems, e.g. older SGI compilers, it
  108. is essential for performance (specifically when compiling ceval.c,
  109. which has more basic blocks than the default limit of 1000).  If the
  110. warning bothers you, edit the Makefile to remove "-Olimit 1500" from
  111. the OPT variable.
  112.  
  113.  
  114. Platform specific notes
  115. -----------------------
  116.  
  117. (Some of these may no longer apply.  If you find you can build Python
  118. on these platforms without the special directions mentioned here, let
  119. me know so I can remove them!)
  120.  
  121. 64-bit platforms: The modules audioop, imageop and rgbimg don't work.
  122.     Don't try to enable them in the Modules/Setup file.  They
  123.     contain code that is quite wordsize sensitive.  (If you have a
  124.     fix, let me know!)
  125.  
  126. Solaris: When using Sun's C compiler with threads, at least on Solaris
  127.     2.5.1, you need to add the "-mt" compiler option (the simplest
  128.     way is probably to specify the compiler with this option as
  129.     the "CC" environment variable when running the configure
  130.     script).
  131.  
  132. Linux:  On Linux version 1.x, once you've built Python, use it to run
  133.     the regen script in the Lib/linux1 directory.  Apparently
  134.     the files as distributed don't match the system headers on
  135.     some Linux versions.  (The "h2py" command refers to
  136.     Tools/scripts/h2py.py.)  The modules distributed for Linux 2.x
  137.     should be okay.  Shared library support now works by default
  138.     on ELF-based x86 Linux systems.  (Note: when you change the
  139.     status of a module from static to shared, you must remove its
  140.     .o file or do a "make clean".)
  141.  
  142.     Under RedHat Linux 5.0, if upgraded from a previous version,
  143.     remove the LinuxThreads packages.  This is needed because
  144.     LinuxThreads conflicts with the new thread support provided by
  145.     glibc.  Before running Python's configure script, use the
  146.     following commands as root (version numbers may differ; these
  147.     are from a stock 4.2 install):
  148.  
  149.     % rpm -qa | grep ^linuxthread
  150.     linuxthreads-0.5-1
  151.     linuxthreads-devel-0.5-1
  152.     % rpm -e linuxthreads linuxthreads-devel
  153.  
  154.     While Python only needs this to be done to allow thread
  155.     support to be included, the conflicts these packages create
  156.     with the new glibc may cause other packages which use threads
  157.     to fail as well, so their removal is a good idea regardless of
  158.     how you configure python.
  159.  
  160.     More recently, a problem with threads and fork() was tracked
  161.     down to a bug in the pthreads code in glibc version 2.0.5;
  162.     glibc version 2.0.7 solves the problem.  This causes the
  163.     popen2 test to fail; problem and solution reported by Pablo
  164.     Bleyer.
  165.  
  166.     Also under RedHat Linux 5.0, the crypt module now needs the
  167.     -lcrypt option.  Uncomment this flag in Modules/Setup, or
  168.     comment out the crypt module in the same file.
  169.  
  170. FreeBSD 3.x and probably platforms with NCurses that use libmytinfo or
  171.     similar: When using cursesmodule, the linking is not done in
  172.     the correct order with the defaults.  Remove "-ltermcap" from
  173.     the readline entry in Setup, and use as curses entry: "curses
  174.     cursesmodule.c -lmytinfo -lncurses -ltermcap" - "mytinfo" (so
  175.     called on FreeBSD) should be the name of the auxiliary library
  176.     required on your platform.  Normally, it would be linked
  177.     automatically, but not necessarily in the correct order.
  178.  
  179. DEC Unix: When enabling threads, use --with-dec-threads, not
  180.     --with-thread.  When using GCC, it is possible to get an
  181.     internal compiler error if optimization is used.  This was
  182.     reported for GCC 2.7.2.3 on selectmodule.c.  Manually compile
  183.     the affected file without optimization to solve the problem.
  184.  
  185. DEC Ultrix: compile with GCC to avoid bugs in the native compiler,
  186.     and pass SHELL=/bin/sh5 to Make when installing.
  187.  
  188. AIX:    A complete overhaul of the shared library support is now in
  189.     place.  See Misc/AIX-NOTES for some notes on how it's done.
  190.     (The optimizer bug reported at this place in previous releases
  191.     has been worked around by a minimal code change.)
  192.     In addition, Gary Duzan has a hint for C++ users: to enable
  193.     full C++ module support, set CC="xlC" (or CC="xlC_r" for thread
  194.     support in AIX 4.2.1).
  195.  
  196. HP-UX:    Please read the file Misc/HPUX-NOTES for shared libraries.
  197.     When using threading, you may have to add -D_REENTRANT to the
  198.     OPT variable in the top-level Makefile; reported by Pat Knight
  199.     this seems to make a difference (at least for HP-UX 10.20)
  200.     even though config.h defines it.
  201.  
  202. Minix:  When using ack, use "CC=cc AR=aal RANLIB=: ./configure"!
  203.  
  204. SCO:    The following only apply to SCO 3; Python builds out of the box
  205.     on SCO 5 (or so I've heard).
  206.  
  207.     1) Everything works much better if you add -U__STDC__ to the
  208.     defs.  This is because all the SCO header files are broken.
  209.     Anything that isn't mentioned in the C standard is
  210.     conditionally excluded when __STDC__ is defined.
  211.  
  212.     2) Due to the U.S. export restrictions, SCO broke the crypt
  213.     stuff out into a separate library, libcrypt_i.a so the LIBS
  214.     needed be set to:
  215.  
  216.         LIBS=' -lsocket -lcrypt_i'
  217.  
  218. SunOS 4.x: When using the standard "cc" compiler, certain modules may
  219.     not be compilable because they use non-K&R syntax.  You should
  220.     be able to get a basic Python interpreter by commenting out
  221.     such modules in the Modules/Setup file, but I really recommend
  222.     using gcc.
  223.  
  224.     When using the SunPro C compiler, you may want to use the
  225.     '-Xa' option instead of '-Xc', to enable some needed non-ANSI
  226.     Sunisms.
  227.  
  228. NeXT:   To build fat binaries, use the --with-next-archs switch
  229.     described below.
  230.  
  231. QNX:    Chris Herborth (chrish@qnx.com) writes:
  232.     configure works best if you use GNU bash; a port is available on
  233.     ftp.qnx.com in /usr/free.  I used the following process to build,
  234.     test and install Python 1.5.x under QNX:
  235.  
  236.     1) CONFIG_SHELL=/usr/local/bin/bash CC=cc RANLIB=: \
  237.         ./configure --verbose --without-gcc --with-libm=""
  238.  
  239.     2) copy Modules/Setup.in to Modules/Setup; edit Modules/Setup to
  240.        activate everything that makes sense for your system... tested
  241.        here at QNX with the following modules:
  242.  
  243.         array, audioop, binascii, cPickle, cStringIO, cmath,
  244.         crypt, curses, errno, fcntl, gdbm, grp, imageop,
  245.         _locale, math, md5, new, operator, parser, pcre,
  246.         posix, pwd, readline, regex, reop, rgbimg, rotor,
  247.         select, signal, socket, soundex, strop, struct,
  248.         syslog, termios, time, timing, zlib, audioop, imageop, rgbimg
  249.  
  250.     3) make SHELL=/usr/local/bin/bash 
  251.     
  252.        or, if you feel the need for speed:
  253.        
  254.        make SHELL=/usr/local/bin/bash OPT="-5 -Oil+nrt"
  255.  
  256.     4) make SHELL=/usr/local/bin/bash test
  257.  
  258.        Using GNU readline 2.2 seems to behave strangely, but I
  259.        think that's a problem with my readline 2.2 port.  :-\
  260.  
  261.     5) make SHELL=/usr/local/bin/bash install
  262.  
  263.     If you get SIGSEGVs while running Python (I haven't yet, but
  264.     I've only run small programs and the test cases), you're
  265.     probably running out of stack; the default 32k could be a
  266.     little tight.  To increase the stack size, edit the Makefile
  267.     in the Modules directory to read: LDFLAGS = -N 48k
  268.  
  269. BeOS:    Chris Herborth (chrish@qnx.com) writes:
  270.     See BeOS/README for notes about compiling/installing Python on
  271.     BeOS R3 or later.  Note that only the PowerPC platform is
  272.     supported for R3; both PowerPC and x86 are supported for R4.
  273.  
  274. Cray T3E: Konrad Hinsen writes:
  275.     1) Don't use gcc. It compiles Python/graminit.c into something
  276.        that the Cray assembler doesn't like. Cray's cc seems to work
  277.        fine.
  278.     2) Uncomment modules md5 (won't compile) and audioop (will
  279.        crash the interpreter during the test suite).
  280.     If you run the test suite, two tests will fail (rotate and
  281.     binascii), but these are not the modules you'd expect to need
  282.     on a Cray.
  283.  
  284. SGI:    SGI's standard "make" utility (/bin/make or /usr/bin/make)
  285.     does not check whether a command actually changed the file it
  286.     is supposed to build.  This means that whenever you say "make"
  287.     it will redo the link step.  The remedy is to use SGI's much
  288.     smarter "smake " utility (/usr/sbin/smake), or GNU make.  If
  289.     you set the first line of the Makefile to #!/usr/sbin/smake
  290.     smake will be invoked by make (likewise for GNU make).
  291.  
  292.     A bug in the MIPSpro 7.1 compiler's optimizer seems to break
  293.     Modules/pypcre.c.  The short term solution is to compile it
  294.     without optimization.  The bug is fixed in version 7.2.1 of
  295.     the compiler.
  296.  
  297.     A bug in gcc-2.8.1 sets sys.maxint to -1 which *also* seems to
  298.     break Modules/pypcre.c.  The egcs versions of gcc fix this
  299.     problem.  Or use configure --without-gcc to compile with SGI's
  300.     compiler, if you have it.  (Raj Srinivasan, Kelvin Chu)
  301.  
  302. OS/2:   If you are running Warp3 or Warp4 and have IBM's VisualAge C/C++
  303.         compiler installed, just change into the pc\os2vacpp directory
  304.         and type NMAKE.  Threading and sockets are supported by default
  305.         in the resulting binaries of PYTHON15.DLL and PYTHON.EXE.
  306.  
  307.  
  308. Configuring threads
  309. -------------------
  310.  
  311. The main switch to configure threads is to run the configure script
  312. (see below) with the --with-thread switch (on DEC, use
  313. --with-dec-threads).  Unfortunately, on some platforms, additional
  314. compiler and/or linker options are required.  Below is a table of
  315. those options, collected by Bill Janssen.  I would love to automate
  316. this process more, but the information below is not enough to write a
  317. patch for the configure.in file, so manual intervention is required.
  318. If you patch the configure.in file and are confident that the patch
  319. works, please send me the patch.  (Don't bother patching the configure
  320. script itself -- it is regenerated each the configure.in file
  321. changes.)
  322.  
  323. Compiler switches for threads
  324. .............................
  325.  
  326.     OS/Compiler/threads                     Switches for use with threads
  327.     (POSIX is draft 10, DCE is draft 4)     (1) compile only (2) compile & link
  328.  
  329.     SunOS 5.{1-5}/{gcc,SunPro cc}/solaris   (1) -D_REENTRANT   (2) -mt
  330.     SunOS 5.5/{gcc,SunPro cc}/POSIX         (1) -D_REENTRANT
  331.     DEC OSF/1 3.x/cc/DCE                    (1) -D_REENTRANT   (2) -threads 
  332.         (butenhof@zko.dec.com)
  333.     Digital UNIX 4.x/cc/DCE                 (1) -D_REENTRANT   (2) -threads 
  334.         (butenhof@zko.dec.com)
  335.     Digital UNIX 4.x/cc/POSIX               (1) -D_REENTRANT   (2) -pthread 
  336.         (butenhof@zko.dec.com)
  337.     AIX 4.1.4/cc_r/d7                       (nothing)                       
  338.         (buhrt@iquest.net)
  339.     AIX 4.1.4/cc_r4/DCE                     (nothing)                       
  340.         (buhrt@iquest.net)
  341.     IRIX 6.2/cc/POSIX                       (nothing)                       
  342.         (robertl@cwi.nl)
  343.  
  344.  
  345. Linker (ld) libraries and flags for threads
  346. ...........................................
  347.  
  348.     OS/threads                          Libraries/switches for use with threads
  349.  
  350.     SunOS 5.{1-5}/solaris               -lthread
  351.     SunOS 5.5/POSIX                     -lpthread
  352.     DEC OSF/1 3.x/DCE                   -lpthreads -lmach -lc_r -lc     
  353.         (butenhof@zko.dec.com)
  354.     Digital UNIX 4.x/DCE                -lpthreads -lpthread -lmach -lexc -lc
  355.         (butenhof@zko.dec.com)
  356.     Digital UNIX 4.x/POSIX              -lpthread -lmach -lexc -lc      
  357.         (butenhof@zko.dec.com)
  358.     AIX 4.1.4/{draft7,DCE}              (nothing)                       
  359.         (buhrt@iquest.net)
  360.     IRIX 6.2/POSIX                      -lpthread                       
  361.         (jph@emilia.engr.sgi.com)
  362.  
  363.  
  364. Configuring additional built-in modules
  365. ---------------------------------------
  366.  
  367. You can configure the interpreter to contain fewer or more built-in
  368. modules by editing the file Modules/Setup.  This file is initially
  369. copied (when the toplevel Makefile makes Modules/Makefile for the
  370. first time) from Setup.in; if it does not exist yet, make a copy
  371. yourself.  Never edit Setup.in -- always edit Setup.  Read the
  372. comments in the file for information on what kind of edits you can
  373. make.  When you have edited Setup, Makefile and config.c in Modules
  374. will automatically be rebuilt the next time you run make in the
  375. toplevel directory.  (When working inside the Modules directory, use
  376. "make Makefile; make".)
  377.  
  378. The default collection of modules should build on any Unix system, but
  379. many optional modules should work on all modern Unices (e.g. try dbm,
  380. nis, termios, timing, syslog, curses, new, soundex, parser).  Often
  381. the quickest way to determine whether a particular module works or not
  382. is to see if it will build: enable it in Setup, then if you get
  383. compilation or link errors, disable it -- you're missing support.
  384.  
  385. On SGI IRIX, there are modules that interface to many SGI specific
  386. system libraries, e.g. the GL library and the audio hardware.
  387.  
  388. For SunOS and Solaris, enable module "sunaudiodev" to support the
  389. audio device.
  390.  
  391. In addition to the file Setup, you can also edit the file Setup.local.
  392. (the makesetup script processes both).  You may find it more
  393. convenient to edit Setup.local and leave Setup alone.  Then, when
  394. installing a new Python version, you can copy your old Setup.local
  395. file.
  396.  
  397.  
  398. Setting the optimization/debugging options
  399. ------------------------------------------
  400.  
  401. If you want or need to change the optimization/debugging options for
  402. the C compiler, assign to the OPT variable on the toplevel make
  403. command; e.g. "make OPT=-g" will build a debugging version of Python
  404. on most platforms.  The default is OPT=-O; a value for OPT in the
  405. environment when the configure script is run overrides this default
  406. (likewise for CC; and the initial value for LIBS is used as the base
  407. set of libraries to link with).
  408.  
  409.  
  410. Testing
  411. -------
  412.  
  413. To test the interpreter that you have just built, type "make test".
  414. This runs the test set twice (once with no compiled files, once with
  415. the compiled files left by the previous test run).  The test set
  416. produces some output.  You can generally ignore the messages about
  417. skipped tests due to an optional feature that can't be imported (if
  418. you want to test those modules, edit Modules/Setup to configure them).
  419. If a messages is printed about a failed test or a traceback or core
  420. dump is produced, something's wrong.  On some Linux systems (those
  421. that are not yet using glibc 6), test_strftime fails due to a
  422. non-standard-compliant implementation of strftime() in the C library.
  423. Please ignore this, or upgrade to glibc version 6.
  424.  
  425. IMPORTANT: If the tests fail and you decide to mail a bug report,
  426. *don't* include the output of "make test".  It is useless.  Run the
  427. test that fails manually, as follows:
  428.  
  429.     python ../Lib/test/test_whatever.py
  430.  
  431. (substituting the top of the source tree for .. if you built in a
  432. different directory).  This runs the test in verbose mode.
  433.  
  434.  
  435. Installing
  436. ----------
  437.  
  438. To install the Python binary, library modules, shared library modules
  439. (see below), include files, configuration files, and the manual page,
  440. just type
  441.  
  442.     make install
  443.  
  444. This will install all platform-independent files in subdirectories the
  445. directory given with the --prefix option to configure or the 'prefix'
  446. Make variable (default /usr/local), and all binary and other
  447. platform-specific files in subdirectories if the directory given by
  448. --exec-prefix or the 'exec_prefix' Make variable (defaults to the
  449. --prefix directory).
  450.  
  451. All subdirectories created will have Python's version number in their
  452. name, e.g. the library modules are installed in
  453. "/usr/local/lib/python1.6/" by default.  The Python binary is
  454. installed as "python1.6" and a hard link named "python" is created.
  455. The only file not installed with a version number in its name is the
  456. manual page, installed as "/usr/local/man/man1/python.1" by default.
  457.  
  458. If you have a previous installation of a pre-1.6 Python that you don't
  459. want to replace yet, use
  460.  
  461.     make altinstall
  462.  
  463. This installs the same set of files as "make install" except it
  464. doesn't create the hard link to "python1.6" named "python" and it
  465. doesn't install the manual page at all.
  466.  
  467. The only thing you may have to install manually is the Python mode for
  468. Emacs.  (But then again, more recent versions of Emacs may already
  469. have it!)  This is the file Misc/python-mode.el; follow the
  470. instructions that came with Emacs for installation of site specific
  471. files.
  472.  
  473.  
  474. Configuration options and variables
  475. -----------------------------------
  476.  
  477. Some special cases are handled by passing options to the configure
  478. script.
  479.  
  480. WARNING: if you rerun the configure script with different options, you
  481. must run "make clean" before rebuilding.  Exceptions to this rule:
  482. after changing --prefix or --exec-prefix, all you need to do is remove
  483. Modules/getpath.o.
  484.  
  485. --with(out)-gcc: The configure script uses gcc (the GNU C compiler) if
  486.     it finds it.  If you don't want this, or if this compiler is
  487.     installed but broken on your platform, pass the option
  488.     --without-gcc.  You can also pass "CC=cc" (or whatever the
  489.     name of the proper C compiler is) in the environment, but the
  490.     advantage of using --without-gcc is that this option is
  491.     remembered by the config.status script for its --recheck
  492.     option.
  493.  
  494. --prefix, --exec-prefix: If you want to install the binaries and the
  495.     Python library somewhere else than in /usr/local/{bin,lib},
  496.     you can pass the option --prefix=DIRECTORY; the interpreter
  497.     binary will be installed as DIRECTORY/bin/python and the
  498.     library files as DIRECTORY/lib/python/*.  If you pass
  499.     --exec-prefix=DIRECTORY (as well) this overrides the
  500.     installation prefix for architecture-dependent files (like the
  501.     interpreter binary).  Note that --prefix=DIRECTORY also
  502.     affects the default module search path (sys.path), when
  503.     Modules/config.c is compiled.  Passing make the option
  504.     prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the
  505.     prefix set at configuration time; this may be more convenient
  506.     than re-running the configure script if you change your mind
  507.     about the install prefix...
  508.  
  509. --with-readline: This option is no longer supported.  To use GNU
  510.     readline, enable module "readline" in the Modules/Setup file.
  511.  
  512. --with-thread: On most Unix systems, you can now use multiple threads.
  513.     To enable this, pass --with-thread.  (--with-threads is an
  514.     alias.)  If the library required for threads lives in a
  515.     peculiar place, you can use --with-thread=DIRECTORY.  NOTE:
  516.     you must also enable the thread module by uncommenting it in
  517.     the Modules/Setup file.  (Threads aren't enabled automatically
  518.     because there are run-time penalties when support for them is
  519.     compiled in even if you don't use them.)  IMPORTANT: run "make
  520.     clean" after changing (either enabling or disabling) this
  521.     option, or you will get link errors!  Note: for DEC Unix use
  522.     --with-dec-threads instead.
  523.  
  524. --with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is
  525.     supported by the "dl" library by Jack Jansen, which is
  526.     ftp'able from ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
  527.     This is enabled (after you've ftp'ed and compiled the dl
  528.     library!) by passing --with-sgi-dl=DIRECTORY where DIRECTORY
  529.     is the absolute pathname of the dl library.  (Don't bother on
  530.     IRIX 5, it already has dynamic linking using SunOS style
  531.     shared libraries.)  Support for this feature is deprecated.
  532.  
  533. --with-dl-dld: Dynamic loading of modules is rumoured to be supported
  534.     on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent
  535.     Symmetry (Dynix), and Atari ST.  This is done using a
  536.     combination of the GNU dynamic loading package
  537.     (ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z) and an
  538.     emulation of the SGI dl library mentioned above (the emulation
  539.     can be found at
  540.     ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z).  To
  541.     enable this, ftp and compile both libraries, then call the
  542.     configure passing it the option
  543.     --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is
  544.     the absolute pathname of the dl emulation library and
  545.     DLD_DIRECTORY is the absolute pathname of the GNU dld library.
  546.     (Don't bother on SunOS 4 or 5, they already have dynamic
  547.     linking using shared libraries.)  Support for this feature is
  548.     deprecated.
  549.  
  550. --with-libm, --with-libc: It is possible to specify alternative
  551.     versions for the Math library (default -lm) and the C library
  552.     (default the empty string) using the options
  553.     --with-libm=STRING and --with-libc=STRING, respectively.  E.g.
  554.     if your system requires that you pass -lc_s to the C compiler
  555.     to use the shared C library, you can pass --with-libc=-lc_s.
  556.     These libraries are passed after all other libraries, the C
  557.     library last.
  558.     
  559. --with-next-archs='arch1 arch2': Under NEXTSTEP, this will build
  560.     all compiled binaries with the architectures listed.  Includes
  561.     correctly setting the target architecture specific resource
  562.     directory.  (This option is not supported on other platforms.)
  563.  
  564. --with-libs='libs': Add 'libs' to the LIBS that the python
  565.     linked against.
  566.  
  567.  
  568. Building for multiple architectures (using the VPATH feature)
  569. -------------------------------------------------------------
  570.  
  571. If your file system is shared between multiple architectures, it
  572. usually is not necessary to make copies of the sources for each
  573. architecture you want to support.  If the make program supports the
  574. VPATH feature, you can create an empty build directory for each
  575. architecture, and in each directory run the configure script (on the
  576. appropriate machine with the appropriate options).  This creates the
  577. necessary subdirectories and the Makefiles therein.  The Makefiles
  578. contain a line VPATH=... which points to directory containing the
  579. actual sources.  (On SGI systems, use "smake -J1" instead of "make" if
  580. you use VPATH -- don't try gnumake.)
  581.  
  582. For example, the following is all you need to build a minimal Python
  583. in /usr/tmp/python (assuming ~guido/src/python is the toplevel
  584. directory and you want to build in /usr/tmp/python):
  585.  
  586.     $ mkdir /usr/tmp/python
  587.     $ cd /usr/tmp/python
  588.     $ ~guido/src/python/configure
  589.     [...]
  590.     $ make
  591.     [...]
  592.     $
  593.  
  594. Note that Modules/Makefile copies the original Setup file to the build
  595. directory if it finds no Setup file there.  This means that you can
  596. edit the Setup file for each architecture independently.  For this
  597. reason, subsequent changes to the original Setup file are not tracked
  598. automatically, as they might overwrite local changes.  To force a copy
  599. of a changed original Setup file, delete the target Setup file.  (The
  600. makesetup script supports multiple input files, so if you want to be
  601. fancy you can change the rules to create an empty Setup.local if it
  602. doesn't exist and run it with arguments $(srcdir)/Setup Setup.local;
  603. however this assumes that you only need to add modules.)
  604.  
  605.  
  606. Building on non-UNIX systems
  607. ----------------------------
  608.  
  609. For Windows 95/98 or NT, assuming you have MS VC++ 5.0 or 6.0, the
  610. project files are in PCbuild, the workspace is pcbuild.dsw.  (The
  611. project files are for VC++ 5.0, but VC++ 6.0 will convert them for
  612. you -- start VC++ and then use Open Workspace.)
  613.  
  614. For other non-Unix Windows compilers, in particular Windows 3.1 and
  615. for OS/2, enter the directory "PC" and read the file "readme.txt".
  616.  
  617. For the Mac, a separate source distribution will be made available,
  618. for use with the CodeWarrior compiler.  If you are interested in Mac
  619. development, join the PythonMac Special Interest Group
  620. (http://www.python.org/sigs/pythonmac-sig/, or send email to
  621. pythonmac-sig-request@python.org).
  622.  
  623. Of course, there are also binary distributions available for these
  624. platforms -- see http://www.python.org/python/.
  625.  
  626. To port Python to a new non-UNIX system, you will have to fake the
  627. effect of running the configure script manually (for Mac and PC, this
  628. has already been done for you).  A good start is to copy the file
  629. config.h.in to config.h and edit the latter to reflect the actual
  630. configuration of your system.  Most symbols must simply be defined as
  631. 1 only if the corresponding feature is present and can be left alone
  632. otherwise; however RETSIGTYPE must always be defined, either as int or
  633. as void, and the *_t type symbols must be defined as some variant of
  634. int if they need to be defined at all.
  635.  
  636.  
  637.  
  638. Miscellaneous issues
  639. ====================
  640.  
  641. Documentation
  642. -------------
  643.  
  644. All documentation is provided online in a variety of formats.  In
  645. order of importance for new users: Tutorial, Library Reference,
  646. Language Reference, Extending & Embedding, and the Python/C API.
  647. Especially the Library Reference is of immense value since much of
  648. Python's power (including the built-in data types and functions!) is
  649. described there.
  650.  
  651. All documentation is also available online via the Python web site
  652. (http://www.python.org/, see below).  It is available online for
  653. occaissional reference, or can be downloaded in many formats for
  654. faster access.  The documents are available in HTML, PostScript, PDF,
  655. HTML Help, and LaTeX; the LaTeX version is primarily for documentation
  656. authors or people with special formatting requirements.
  657.  
  658.  
  659. Emacs mode
  660. ----------
  661.  
  662. There's an excellent Emacs editing mode for Python code; see the file
  663. Misc/python-mode.el.  Originally written by the famous Tim Peters, it
  664. is now maintained by the equally famous Barry Warsaw
  665. <bwarsaw@beopen.com>.  The latest version, along with various
  666. other contributed Python-related Emacs goodies, is online at
  667. <http://www.python.org/emacs/python-mode>.  And if you are planning to
  668. edit the Python C code, please pick up the latest version of CC Mode
  669. <http://www.python.org/emacs/cc-mode>; it contains a "python" style
  670. used throughout most of the Python C source files.
  671.  
  672.  
  673. Web site
  674. --------
  675.  
  676. Python's own web site has URL http://www.python.org/.  Come visit us!
  677. There are a number of mirrors, and a list of mirrors is accessible
  678. from the home page -- try a mirror that's close you you.
  679.  
  680.  
  681. Ftp site
  682. --------
  683.  
  684. Python's own ftp site is ftp://ftp.python.org/pub/python/.  There are
  685. numerous mirrors; the list of mirrors is accessible from
  686. http://www.python.org/.
  687.  
  688.  
  689. Newsgroups
  690. ----------
  691.  
  692. Read comp.lang.python, a high-volume discussion newsgroup about
  693. Python, or comp.lang.python.announce, a low-volume moderated newsgroup
  694. for Python-related announcements.  These are also accessible as
  695. mailing lists, see the next item.
  696.  
  697. Archives are accessible via Deja News; the Python website has a
  698. query form for the archives at http://www.python.org/search/.
  699.  
  700.  
  701. Mailing lists
  702. -------------
  703.  
  704. See http://www.python.org/psa/MailingLists.html for an overview of the 
  705. many Python related mailing lists.
  706.  
  707.  
  708. Bug reports and patches
  709. -----------------------
  710.  
  711. To report a bug or contribute a patch, use the Python project at
  712. SourceForge: http://sourceforge.net/projects/python.
  713.  
  714.  
  715. Questions
  716. ---------
  717.  
  718. For help, if you can't find it in the manuals or on the web site, it's
  719. best to post to the comp.lang.python or the Python mailing list (see
  720. above).  If you specifically don't want to involve the newsgroup or
  721. mailing list, send questions to <python-help@python.org> (a group of
  722. volunteers which does *not* include me).  Because of my work and email
  723. volume, I'm often be slow in answering questions sent to me directly;
  724. I prefer to answer questions posted to the newsgroup.
  725.  
  726.  
  727. The Tk interface
  728. ----------------
  729.  
  730. Tk (the user interface component of John Ousterhout's Tcl language) is
  731. also usable from Python.  Since this requires that you first build and
  732. install Tcl/Tk, the Tk interface is not enabled by default.  Python
  733. supports all Tcl/Tk versions from version 7.5/4.1 through 8.0 (and it
  734. is expected that it will also work with newer versions).  Tcl/Tk
  735. 7.4/4.0 is no longer supported.  8.0 or any later non-alpha non-beta
  736. release is recommended.
  737.  
  738. See http://www.tcltk.com/ for more info on Tcl/Tk, including the
  739. on-line manual pages.
  740.  
  741.  
  742. To enable the Python/Tk interface, once you've built and installed
  743. Tcl/Tk, load the file Modules/Setup in your favorite text editor and
  744. search for the string "_tkinter".  Then follow the instructions found
  745. there.  If you have installed Tcl/Tk or X11 in unusual places, you
  746. will have to edit the first line to fix or add -I and -L options.
  747. (Also see the general instructions at the top of that file.)
  748.  
  749. There is little documentation on how to use Tkinter; however most of
  750. the Tk manual pages apply quite straightforwardly.  Begin with
  751. fetching the "Tk Lifesaver" document,
  752. e.g. ftp://ftp.python.org/pub/python/doc/tkinter-doc.tar.gz (a gzipped
  753. tar file containing a PostScript file) or the on-line version
  754. http://www.python.org/doc/life-preserver/index.html.  Reading the
  755. Tkinter.py source will reveal most details on how Tkinter calls are
  756. translated into Tcl code.
  757.  
  758. A more recent introduction to Tkinter programming, by Fredrik Lundh,
  759. is at http://www.pythonware.com/library/tkinter/introduction/index.htm.
  760. At least one book has been published on Tkinter; go to the PSA bookstore
  761. for more information:  http://www.python.org/psa/bookstore/.
  762.  
  763. There are demos in the Demo/tkinter directory, in the subdirectories
  764. guido, matt and www (the matt and guido subdirectories have been
  765. overhauled to use more recent Tkinter coding conventions).
  766.  
  767. Note that there's a Python module called "Tkinter" (capital T) which
  768. lives in Lib/tkinter/Tkinter.py, and a C module called "_tkinter"
  769. (lower case t and leading underscore) which lives in
  770. Modules/_tkinter.c.  Demos and normal Tk applications only import the
  771. Python Tkinter module -- only the latter uses the C _tkinter module
  772. directly.  In order to find the C _tkinter module, it must be compiled
  773. and linked into the Python interpreter -- the _tkinter line in the
  774. Setup file does this.  In order to find the Python Tkinter module,
  775. sys.path must be set correctly -- the TKPATH assignment in the Setup
  776. file takes care of this, but only if you install Python properly
  777. ("make install libinstall").  (You can also use dynamic loading for
  778. the C _tkinter module, in which case you must manually fix up sys.path
  779. or set $PYTHONPATH for the Python Tkinter module.)
  780.  
  781.  
  782. Distribution structure
  783. ----------------------
  784.  
  785. Most subdirectories have their own README file.  Most files have
  786. comments.
  787.  
  788. Demo/           Demonstration scripts, modules and programs
  789. Grammar/        Input for the parser generator
  790. Include/        Public header files
  791. Lib/            Python library modules
  792. Makefile.in     Source from which config.status creates Makefile
  793. Misc/           Miscellaneous useful files
  794. Modules/        Implementation of most built-in modules
  795. Objects/        Implementation of most built-in object types
  796. PC/             PC porting files (DOS, Windows, OS/2)
  797. PCbuild/    Directory where you should build for Windows NT/95
  798. Parser/         The parser and tokenizer and their input handling
  799. Python/         The "compiler" and interpreter
  800. README          The file you're reading now
  801. Tools/          Some useful programs written in Python
  802. acconfig.h      Additional input for the autoheader program
  803. config.h.in     Source from which config.status creates config.h
  804. configure       Configuration shell script (GNU autoconf output)
  805. configure.in    Configuration specification (GNU autoconf input)
  806. install-sh      Shell script used to install files
  807.  
  808. The following files will (may) be created in the toplevel directory by
  809. the configuration and build processes:
  810.  
  811. Makefile        Build rules
  812. config.cache    cache of configuration variables
  813. config.h        Configuration header
  814. config.log      Log from last configure run
  815. config.status   Status from last run of configure script
  816. libpython1.6.a    The library archive
  817. python          The executable interpreter
  818. tags, TAGS      Tags files for vi and Emacs
  819.  
  820.  
  821. That's all, folks!
  822. ------------------
  823.  
  824.  
  825. --Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)
  826.